#ifndef PICSTATEBUTTON_H
#define PICSTATEBUTTON_H
#include <QPushButton>

class PicStateButton : public QPushButton
{
    Q_OBJECT
public:
    PicStateButton(QWidget* parent = nullptr);
    //分别对应播放时按钮的状态和暂停时按钮的状态
    void SetIcons(const QString& normalShow,const QString& hoverShow,const QString& pressedShow,
                  const QString& normalSuspend,const QString& hoverSuspend,const QString& pressedSuspend);
    bool event(QEvent *e) override;

public slots:
    void SlotStart();
    void SlotStop();

private:
    void setNormalIcon();
    void setHoverIcon();
    void setPressIcon();

    void setNormalSuspendIcon();
    void setHoverSuspendIcon();
    void setPressSuspendIcon();

    QString _normalShow;
    QString _hoverShow;
    QString _pressedShow;
    QString _normalSuspend;
    QString _hoverSuspend;
    QString _pressedSuspend;
    int _cur_state;//记录当前状态
};

#endif // PICSTATEBUTTON_H
